home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / python2.4 / config / Makefile
Encoding:
Makefile  |  2007-04-12  |  35.8 KB  |  1,089 lines

  1. # Generated automatically from Makefile.pre by makesetup.
  2. # Top-level Makefile for Python
  3. #
  4. # As distributed, this file is called Makefile.pre.in; it is processed
  5. # into the real Makefile by running the script ./configure, which
  6. # replaces things like @spam@ with values appropriate for your system.
  7. # This means that if you edit Makefile, your changes get lost the next
  8. # time you run the configure script.  Ideally, you can do:
  9. #
  10. #    ./configure
  11. #    make
  12. #    make test
  13. #    make install
  14. #
  15. # If you have a previous version of Python installed that you don't
  16. # want to overwrite, you can use "make altinstall" instead of "make
  17. # install".  Refer to the "Installing" section in the README file for
  18. # additional details.
  19. #
  20. # See also the section "Build instructions" in the README file.
  21.  
  22. # === Variables set by makesetup ===
  23.  
  24. MODOBJS=          Modules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o
  25. MODLIBS=        $(LOCALMODLIBS) $(BASEMODLIBS)
  26.  
  27. # === Variables set by configure
  28. VERSION=    2.4
  29. srcdir=        ..
  30. VPATH=        ..
  31.  
  32. CC=        gcc -pthread
  33. CXX=        g++ -pthread        
  34. LINKCC=        $(PURIFY) $(CC)
  35. AR=        ar
  36. RANLIB=        ranlib
  37.  
  38. # Shell used by make (some versions default to the login shell, which is bad)
  39. SHELL=        /bin/sh
  40.  
  41. # Use this to make a link between python$(VERSION) and python in $(BINDIR)
  42. LN=        ln
  43.  
  44. # Portable install script (configure doesn't always guess right)
  45. INSTALL=    /usr/bin/install -c
  46. INSTALL_PROGRAM=${INSTALL}
  47. INSTALL_SCRIPT= ${INSTALL}
  48. INSTALL_DATA=    ${INSTALL} -m 644
  49. # Shared libraries must be installed with executable mode on some systems;
  50. # rather than figuring out exactly which, we always give them executable mode.
  51. # Also, making them read-only seems to be a good idea...
  52. INSTALL_SHARED= ${INSTALL} -m 555
  53.  
  54. MAKESETUP=      $(srcdir)/Modules/makesetup
  55.  
  56. # Compiler options
  57. OPT=        -DNDEBUG -g -O2 -Wall -Wstrict-prototypes
  58. BASECFLAGS=     -fno-strict-aliasing
  59. CFLAGS=        $(BASECFLAGS) $(OPT)
  60. CPPFLAGS=    -I. -I$(srcdir)/Include
  61. LDFLAGS=    
  62. LDLAST=        
  63. SGI_ABI=    
  64. CCSHARED=    -fPIC
  65. LINKFORSHARED=    -Xlinker -export-dynamic
  66. # Extra C flags added for building the interpreter object files.
  67. CFLAGSFORSHARED=$(CCSHARED)
  68. # C flags used for building the interpreter object files
  69. PY_CFLAGS=    $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
  70.  
  71.  
  72. # Machine-dependent subdirectories
  73. MACHDEP=    linux2
  74.  
  75. # Install prefix for architecture-independent files
  76. prefix=        /usr
  77.  
  78. # Install prefix for architecture-dependent files
  79. exec_prefix=    ${prefix}
  80.  
  81. # Expanded directories
  82. BINDIR=        $(exec_prefix)/bin
  83. LIBDIR=        $(exec_prefix)/lib
  84. MANDIR=        ${prefix}/share/man
  85. INCLUDEDIR=    ${prefix}/include
  86. CONFINCLUDEDIR=    $(exec_prefix)/include
  87. SCRIPTDIR=    $(prefix)/lib
  88.  
  89. # Detailed destination directories
  90. BINLIBDEST=    $(LIBDIR)/python$(VERSION)
  91. LIBDEST=    $(SCRIPTDIR)/python$(VERSION)
  92. INCLUDEPY=    $(INCLUDEDIR)/python$(VERSION)$(DEBUG_EXT)
  93. CONFINCLUDEPY=    $(CONFINCLUDEDIR)/python$(VERSION)$(DEBUG_EXT)
  94. LIBP=        $(LIBDIR)/python$(VERSION)
  95.  
  96. # Symbols used for using shared libraries
  97. SO=        .so
  98. LDSHARED=    $(CC) -shared
  99. BLDSHARED=    $(CC) -shared
  100. DESTSHARED=    $(BINLIBDEST)/lib-dynload
  101.  
  102. # Executable suffix (.exe on Windows and Mac OS X)
  103. EXE=        
  104. BUILDEXE=    
  105.  
  106. DEBUG_EXT=    
  107.  
  108. # Short name and location for Mac OS X Python framework
  109. UNIVERSALSDK=
  110. PYTHONFRAMEWORK=    
  111. PYTHONFRAMEWORKDIR=    no-framework
  112. PYTHONFRAMEWORKPREFIX=    
  113. PYTHONFRAMEWORKINSTALLDIR= 
  114. # Deployment target selected during configure, to be checked
  115. # by distutils. The export statement is needed to ensure that the
  116. # deployment target is active during build.
  117. MACOSX_DEPLOYMENT_TARGET=
  118. #export MACOSX_DEPLOYMENT_TARGET
  119.  
  120. # Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
  121. OTHER_LIBTOOL_OPT=
  122.  
  123. # Environment to run shared python without installed libraries
  124. RUNSHARED=
  125.  
  126. # Modes for directories, executables and data files created by the
  127. # install process.  Default to user-only-writable for all file types.
  128. DIRMODE=    755
  129. EXEMODE=    755
  130. FILEMODE=    644
  131.  
  132. # configure script arguments
  133. CONFIG_ARGS=     '--enable-shared' '--prefix=/usr' '--enable-ipv6' '--enable-unicode=ucs4' '--without-cxx' '--with-fpectl' 'CC=gcc'
  134.  
  135.  
  136. # Subdirectories with code
  137. SRCDIRS=     Parser Grammar Objects Python Modules Mac Mac/Python
  138.  
  139. # Other subdirectories
  140. SUBDIRSTOO=    Include Lib Misc Demo
  141.  
  142. # Files and directories to be distributed
  143. CONFIGFILES=    configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
  144. DISTFILES=    README ChangeLog $(CONFIGFILES)
  145. DISTDIRS=    $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
  146. DIST=        $(DISTFILES) $(DISTDIRS)
  147.  
  148.  
  149. LIBRARY=    libpython$(VERSION).a
  150. LDLIBRARY=      libpython$(VERSION).so
  151. BLDLIBRARY=     -L. -lpython$(VERSION)
  152. DLLLIBRARY=    
  153. LDLIBRARYDIR=   
  154. INSTSONAME=    libpython$(VERSION).so.1.0
  155.  
  156.  
  157. LIBS=        -lpthread -ldl  -lutil
  158. LIBM=        -lm
  159. LIBC=        
  160. SYSLIBS=    $(LIBM) $(LIBC)
  161. SHLIBS=        $(LIBS)
  162.  
  163. MAINOBJ=    python.o
  164. THREADOBJ=    Python/thread.o
  165. DLINCLDIR=    .
  166. DYNLOADFILE=    dynload_shlib.o
  167. MACHDEP_OBJS=    
  168. UNICODE_OBJS=   Objects/unicodeobject.o Objects/unicodectype.o
  169.  
  170. PYTHON=        python$(EXE)
  171. BUILDPYTHON=    python$(BUILDEXE)
  172.  
  173. # === Definitions added by makesetup ===
  174.  
  175. LOCALMODLIBS=          
  176. BASEMODLIBS=
  177. GLHACK=-Dclear=__GLclear
  178. PYTHONPATH=$(COREPYTHONPATH)
  179. COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)
  180. TKPATH=:lib-tk
  181. EXTRAMACHDEPPATH=
  182. MACHDEPPATH=:plat-$(MACHDEP)
  183. TESTPATH=
  184. SITEPATH=
  185. DESTPATH=
  186. MACHDESTLIB=$(BINLIBDEST)
  187. DESTLIB=$(LIBDEST)
  188.  
  189.  
  190.  
  191. ##########################################################################
  192. # Modules
  193. MODULE_OBJS=    \
  194.         Modules/config.o \
  195.         Modules/getpath.o \
  196.         Modules/main.o \
  197.         Modules/gcmodule.o
  198.  
  199. # Used of signalmodule.o is not available
  200. SIGNAL_OBJS=    
  201.  
  202.  
  203. ##########################################################################
  204. # Grammar
  205. GRAMMAR_H=    $(srcdir)/Include/graminit.h
  206. GRAMMAR_C=    $(srcdir)/Python/graminit.c
  207. GRAMMAR_INPUT=    $(srcdir)/Grammar/Grammar
  208.  
  209.  
  210. ##########################################################################
  211. # Parser
  212. PGEN=        Parser/pgen$(EXE)
  213.  
  214. POBJS=        \
  215.         Parser/acceler.o \
  216.         Parser/grammar1.o \
  217.         Parser/listnode.o \
  218.         Parser/node.o \
  219.         Parser/parser.o \
  220.         Parser/parsetok.o \
  221.         Parser/bitset.o \
  222.         Parser/metagrammar.o \
  223.         Parser/firstsets.o \
  224.         Parser/grammar.o \
  225.         Parser/pgen.o
  226.  
  227. PARSER_OBJS=    $(POBJS) Parser/myreadline.o Parser/tokenizer.o
  228.  
  229. PGOBJS=        \
  230.         Objects/obmalloc.o \
  231.         Python/mysnprintf.o \
  232.         Parser/tokenizer_pgen.o \
  233.         Parser/printgrammar.o \
  234.         Parser/pgenmain.o
  235.  
  236. PGENOBJS=    $(PGENMAIN) $(POBJS) $(PGOBJS)
  237.  
  238.  
  239. ##########################################################################
  240. # Python
  241. PYTHON_OBJS=    \
  242.         Python/bltinmodule.o \
  243.         Python/exceptions.o \
  244.         Python/ceval.o \
  245.         Python/compile.o \
  246.         Python/codecs.o \
  247.         Python/errors.o \
  248.         Python/frozen.o \
  249.         Python/frozenmain.o \
  250.         Python/future.o \
  251.         Python/getargs.o \
  252.         Python/getcompiler.o \
  253.         Python/getcopyright.o \
  254.         Python/getmtime.o \
  255.         Python/getplatform.o \
  256.         Python/getversion.o \
  257.         Python/graminit.o \
  258.         Python/import.o \
  259.         Python/importdl.o \
  260.         Python/marshal.o \
  261.         Python/modsupport.o \
  262.         Python/mystrtoul.o \
  263.         Python/mysnprintf.o \
  264.         Python/pyfpe.o \
  265.         Python/pystate.o \
  266.         Python/pythonrun.o \
  267.         Python/structmember.o \
  268.         Python/symtable.o \
  269.         Python/sysmodule.o \
  270.         Python/traceback.o \
  271.         Python/getopt.o \
  272.         Python/pystrtod.o \
  273.         Python/$(DYNLOADFILE) \
  274.         $(MACHDEP_OBJS) \
  275.         $(THREADOBJ)
  276.  
  277.  
  278. ##########################################################################
  279. # Objects
  280. OBJECT_OBJS=    \
  281.         Objects/abstract.o \
  282.         Objects/boolobject.o \
  283.         Objects/bufferobject.o \
  284.         Objects/cellobject.o \
  285.         Objects/classobject.o \
  286.         Objects/cobject.o \
  287.         Objects/complexobject.o \
  288.         Objects/descrobject.o \
  289.         Objects/enumobject.o \
  290.         Objects/genobject.o \
  291.         Objects/fileobject.o \
  292.         Objects/floatobject.o \
  293.         Objects/frameobject.o \
  294.         Objects/funcobject.o \
  295.         Objects/intobject.o \
  296.         Objects/iterobject.o \
  297.         Objects/listobject.o \
  298.         Objects/longobject.o \
  299.         Objects/dictobject.o \
  300.         Objects/methodobject.o \
  301.         Objects/moduleobject.o \
  302.         Objects/object.o \
  303.         Objects/obmalloc.o \
  304.         Objects/rangeobject.o \
  305.                 Objects/setobject.o \
  306.         Objects/sliceobject.o \
  307.         Objects/stringobject.o \
  308.         Objects/structseq.o \
  309.         Objects/tupleobject.o \
  310.         Objects/typeobject.o \
  311.         Objects/weakrefobject.o \
  312.         $(UNICODE_OBJS)
  313.  
  314.  
  315. ##########################################################################
  316. # objects that get linked into the Python library
  317. LIBRARY_OBJS=    \
  318.         Modules/getbuildinfo.o \
  319.         $(PARSER_OBJS) \
  320.         $(OBJECT_OBJS) \
  321.         $(PYTHON_OBJS) \
  322.         $(MODULE_OBJS) \
  323.         $(SIGNAL_OBJS) \
  324.         $(MODOBJS)
  325.  
  326. #########################################################################
  327. # Rules
  328.  
  329. # Default target
  330. all:        $(BUILDPYTHON) oldsharedmods sharedmods
  331.  
  332. # Build the interpreter
  333. $(BUILDPYTHON):    Modules/$(MAINOBJ) $(LIBRARY) $(LDLIBRARY)
  334.         $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
  335.             Modules/$(MAINOBJ) \
  336.             $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
  337.  
  338. platform: $(BUILDPYTHON)
  339.     $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
  340.  
  341.  
  342. # Build the shared modules
  343. sharedmods: $(BUILDPYTHON)
  344.     case $$MAKEFLAGS in \
  345.     *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
  346.     *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
  347.     esac
  348.  
  349. # buildno should really depend on something like LIBRARY_SRC
  350. buildno: $(PARSER_OBJS) \
  351.         $(OBJECT_OBJS) \
  352.         $(PYTHON_OBJS) \
  353.         $(MODULE_OBJS) \
  354.         $(SIGNAL_OBJS) \
  355.         $(MODOBJS) \
  356.         $(srcdir)/Modules/getbuildinfo.c
  357.     if test -f buildno; then \
  358.         expr `cat buildno` + 1 >buildno1; \
  359.         mv -f buildno1 buildno; \
  360.     else echo 1 >buildno; fi
  361.  
  362. # Build static library
  363. # avoid long command lines, same as LIBRARY_OBJS
  364. $(LIBRARY): $(LIBRARY_OBJS)
  365.     -rm -f $@
  366.     $(AR) cr $@ Modules/getbuildinfo.o
  367.     $(AR) cr $@ $(PARSER_OBJS)
  368.     $(AR) cr $@ $(OBJECT_OBJS)
  369.     $(AR) cr $@ $(PYTHON_OBJS)
  370.     $(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
  371.     $(AR) cr $@ $(MODOBJS)
  372.     $(RANLIB) $@
  373.  
  374. libpython$(VERSION).so: $(LIBRARY_OBJS)
  375.     if test $(INSTSONAME) != $(LDLIBRARY); then \
  376.         $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
  377.         $(LN) -f $(INSTSONAME) $@; \
  378.     else\
  379.         $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
  380.     fi
  381.  
  382. libpython$(VERSION).sl: $(LIBRARY_OBJS)
  383.     $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
  384.  
  385. # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
  386. # minimal framework (not including the Lib directory and such) in the current
  387. # directory.
  388. RESSRCDIR=$(srcdir)/Mac/OSXResources/framework
  389. $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
  390.         $(LIBRARY) \
  391.         $(RESSRCDIR)/Info.plist \
  392.                 $(RESSRCDIR)/version.plist \
  393.                 $(RESSRCDIR)/English.lproj/InfoPlist.strings
  394.     $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
  395.     if test "${UNIVERSALSDK}"; then \
  396.         $(CC) -o $(LDLIBRARY) -arch i386 -arch ppc -dynamiclib \
  397.             -isysroot "${UNIVERSALSDK}" \
  398.             -all_load $(LIBRARY) -Wl,-single_module \
  399.             -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python \
  400.             -compatibility_version $(VERSION) \
  401.             -current_version $(VERSION); \
  402.         else \
  403.         libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
  404.              ;\
  405.     fi
  406.     $(INSTALL) -d -m $(DIRMODE)  \
  407.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
  408.     $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
  409.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
  410.     $(INSTALL_DATA) $(RESSRCDIR)/version.plist \
  411.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/version.plist
  412.     $(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
  413.         $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj/InfoPlist.strings
  414.     $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
  415.     $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
  416.     $(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers
  417.     $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
  418.  
  419. # This rule builds the Cygwin Python DLL and import library if configured
  420. # for a shared core library; otherwise, this rule is a noop.
  421. $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
  422.     if test -n "$(DLLLIBRARY)"; then \
  423.         $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
  424.             $(LIBS) $(MODLIBS) $(SYSLIBS); \
  425.     else true; \
  426.     fi
  427.  
  428.  
  429. oldsharedmods: $(SHAREDMODS)
  430.  
  431.  
  432. Makefile Modules/config.c: Makefile.pre \
  433.                 $(srcdir)/Modules/config.c.in \
  434.                 $(MAKESETUP) \
  435.                 Modules/Setup.config \
  436.                 Modules/Setup \
  437.                 Modules/Setup.local
  438.     $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
  439.                 -s Modules \
  440.                 Modules/Setup.config \
  441.                 Modules/Setup.local \
  442.                 Modules/Setup
  443.     @mv config.c Modules
  444.     @echo "The Makefile was updated, you may need to re-run make."
  445.  
  446.  
  447. Modules/Setup: $(srcdir)/Modules/Setup.dist
  448.     @if test -f Modules/Setup; then \
  449.         echo "-----------------------------------------------"; \
  450.         echo "Modules/Setup.dist is newer than Modules/Setup;"; \
  451.         echo "check to make sure you have all the updates you"; \
  452.         echo "need in your Modules/Setup file."; \
  453.         echo "Usually, copying Setup.dist to Setup will work."; \
  454.         echo "-----------------------------------------------"; \
  455.     fi
  456.  
  457. ############################################################################
  458. # Special rules for object files
  459.  
  460. Modules/getbuildinfo.o: $(srcdir)/Modules/getbuildinfo.c buildno
  461.     $(CC) -c $(PY_CFLAGS) -DBUILD=`cat buildno` -o $@ $(srcdir)/Modules/getbuildinfo.c
  462.  
  463. Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
  464.     $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
  465.         -DPREFIX='"$(prefix)"' \
  466.         -DEXEC_PREFIX='"$(exec_prefix)"' \
  467.         -DVERSION='"$(VERSION)"' \
  468.         -DVPATH='"$(VPATH)"' \
  469.         -o $@ $(srcdir)/Modules/getpath.c
  470.  
  471. Modules/ccpython.o: $(srcdir)/Modules/ccpython.cc
  472.     $(CXX) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/ccpython.cc
  473.  
  474.  
  475. $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
  476.         -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
  477.  
  478. $(PGEN):    $(PGENOBJS)
  479.         $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
  480.  
  481. Parser/grammar.o:    $(srcdir)/Parser/grammar.c \
  482.                 $(srcdir)/Include/token.h \
  483.                 $(srcdir)/Include/grammar.h
  484. Parser/metagrammar.o:    $(srcdir)/Parser/metagrammar.c
  485.  
  486. Parser/tokenizer_pgen.o:    $(srcdir)/Parser/tokenizer.c
  487.  
  488.  
  489. Python/compile.o Python/symtable.o: $(GRAMMAR_H)
  490.  
  491. Python/getplatform.o: $(srcdir)/Python/getplatform.c
  492.         $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
  493.  
  494. Python/importdl.o: $(srcdir)/Python/importdl.c
  495.         $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
  496.  
  497. Objects/unicodectype.o:    $(srcdir)/Objects/unicodectype.c \
  498.                 $(srcdir)/Objects/unicodetype_db.h
  499.  
  500. ############################################################################
  501. # Header files
  502.  
  503. PYTHON_HEADERS= \
  504.         Include/Python.h \
  505.         Include/abstract.h \
  506.         Include/boolobject.h \
  507.         Include/bufferobject.h \
  508.         Include/ceval.h \
  509.         Include/classobject.h \
  510.         Include/cobject.h \
  511.         Include/codecs.h \
  512.         Include/compile.h \
  513.         Include/complexobject.h \
  514.         Include/descrobject.h \
  515.         Include/dictobject.h \
  516.         Include/enumobject.h \
  517.         Include/genobject.h \
  518.         Include/fileobject.h \
  519.         Include/floatobject.h \
  520.         Include/funcobject.h \
  521.         Include/import.h \
  522.         Include/intobject.h \
  523.         Include/intrcheck.h \
  524.         Include/iterobject.h \
  525.         Include/listobject.h \
  526.         Include/longobject.h \
  527.         Include/methodobject.h \
  528.         Include/modsupport.h \
  529.         Include/moduleobject.h \
  530.         Include/object.h \
  531.         Include/objimpl.h \
  532.         Include/patchlevel.h \
  533.         Include/pydebug.h \
  534.         Include/pyerrors.h \
  535.         Include/pyfpe.h \
  536.         Include/pymem.h \
  537.         Include/pyport.h \
  538.         Include/pystate.h \
  539.         Include/pythonrun.h \
  540.         Include/rangeobject.h \
  541.                 Include/setobject.h \
  542.         Include/sliceobject.h \
  543.         Include/stringobject.h \
  544.         Include/structseq.h \
  545.         Include/structmember.h \
  546.         Include/symtable.h \
  547.         Include/sysmodule.h \
  548.         Include/traceback.h \
  549.         Include/tupleobject.h \
  550.         Include/unicodeobject.h \
  551.         Include/weakrefobject.h \
  552.         pyconfig.h
  553.  
  554. $(LIBRARY_OBJS) $(MODOBJS) Modules/$(MAINOBJ): $(PYTHON_HEADERS)
  555.  
  556.  
  557. ######################################################################
  558.  
  559. # Test the interpreter (twice, once without .pyc files, once with)
  560. # In the past, we've had problems where bugs in the marshalling or
  561. # elsewhere caused bytecode read from .pyc files to behave differently
  562. # than bytecode generated directly from a .py source file.  Sometimes
  563. # the bytecode read from a .pyc file had the bug, somtimes the directly
  564. # generated bytecode.  This is sometimes a very shy bug needing a lot of
  565. # sample data.
  566.  
  567. TESTOPTS=    -l $(EXTRATESTOPTS)
  568. TESTPROG=    $(srcdir)/Lib/test/regrtest.py
  569. TESTPYTHON=    $(RUNSHARED) ./$(BUILDPYTHON) -E -tt
  570. test:        all platform
  571.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  572.         -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  573.         $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  574.  
  575. testall:    all platform
  576.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  577.         -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  578.         $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  579.  
  580. #  Run the unitests for both architectures in a Universal build on OSX
  581. #  Must be run on an Intel box.
  582. testuniversal:    all platform
  583.         if [ `arch` != 'i386' ];then \
  584.             echo "This can only be used on OSX/i386" ;\
  585.             exit 1 ;\
  586.         fi
  587.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  588.         -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  589.         $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  590.         $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall
  591.  
  592.  
  593. # Like testall, but with a single pass only
  594. buildbottest:    all platform
  595.         $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rw
  596.  
  597. QUICKTESTOPTS=    $(TESTOPTS) -x test_thread test_signal test_strftime \
  598.         test_unicodedata test_re test_sre test_select test_poll \
  599.         test_linuxaudiodev test_struct test_sunaudiodev test_zlib
  600. quicktest:    all platform
  601.         -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  602.         -$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
  603.         $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
  604.  
  605. MEMTESTOPTS=    $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
  606.         test_longexp
  607. memtest:    all platform
  608.         -rm -f $(srcdir)/Lib/test/*.py[co]
  609.         -$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
  610.         $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
  611.  
  612. # Install everything
  613. install:     altinstall bininstall maninstall 
  614.  
  615. # Install almost everything without disturbing previous versions
  616. altinstall:      altbininstall libinstall inclinstall libainstall \
  617.                 sharedinstall oldsharedinstall  
  618.  
  619. # Install shared libraries enabled by Setup
  620. DESTDIRS=    $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
  621.  
  622. oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
  623.         @for i in X $(SHAREDMODS); do \
  624.           if test $$i != X; then \
  625.             echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
  626.             $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
  627.           fi; \
  628.         done
  629.  
  630. $(DESTSHARED):
  631.         @for i in $(DESTDIRS); \
  632.         do \
  633.             if test ! -d $(DESTDIR)$$i; then \
  634.                 echo "Creating directory $$i"; \
  635.                 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  636.             else    true; \
  637.             fi; \
  638.         done
  639.  
  640.  
  641. # Install the interpreter (by creating a hard link to python$(VERSION))
  642. bininstall:    altbininstall
  643.     -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
  644.     then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
  645.     else true; \
  646.     fi
  647.     (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
  648.  
  649. # Install the interpreter with $(VERSION) affixed
  650. # This goes into $(exec_prefix)
  651. altbininstall:    $(BUILDPYTHON)
  652.     @if test "$(PYTHONFRAMEWORKDIR)" != no-framework; then \
  653.         if test ! -f $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current/Resources/Info.plist; then \
  654.             echo 'Framework build: use "make frameworkinstall" in stead of "make install"'; \
  655.             exit 1; \
  656.         fi; \
  657.     fi
  658.     @for i in $(BINDIR) $(LIBDIR); \
  659.     do \
  660.         if test ! -d $(DESTDIR)$$i; then \
  661.             echo "Creating directory $$i"; \
  662.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  663.         else    true; \
  664.         fi; \
  665.     done
  666.     $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
  667.     if test -f libpython$(VERSION)$(SO); then \
  668.         if test "$(SO)" = .dll; then \
  669.             $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \
  670.         else \
  671.             $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
  672.             if test libpython$(VERSION)$(SO) != $(INSTSONAME); then \
  673.                 (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
  674.             fi \
  675.         fi; \
  676.     else    true; \
  677.     fi
  678.  
  679. # Install the manual page
  680. maninstall:
  681.     @for i in $(MANDIR) $(MANDIR)/man1; \
  682.     do \
  683.         if test ! -d $(DESTDIR)$$i; then \
  684.             echo "Creating directory $$i"; \
  685.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  686.         else    true; \
  687.         fi; \
  688.     done
  689.     $(INSTALL_DATA) $(srcdir)/Misc/python.man \
  690.         $(DESTDIR)$(MANDIR)/man1/python.1
  691.  
  692. # Install the library
  693. PLATDIR=    plat-$(MACHDEP)
  694. EXTRAPLATDIR= 
  695. EXTRAMACHDEPPATH=
  696. MACHDEPS=    $(PLATDIR) $(EXTRAPLATDIR)
  697. XMLLIBSUBDIRS=  xml xml/dom xml/parsers xml/sax
  698. PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
  699.     plat-mac/lib-scriptpackages/_builtinSuites \
  700.     plat-mac/lib-scriptpackages/CodeWarrior \
  701.     plat-mac/lib-scriptpackages/Explorer \
  702.     plat-mac/lib-scriptpackages/Finder \
  703.     plat-mac/lib-scriptpackages/Netscape \
  704.     plat-mac/lib-scriptpackages/StdSuites \
  705.     plat-mac/lib-scriptpackages/SystemEvents \
  706.     plat-mac/lib-scriptpackages/Terminal
  707. PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
  708. LIBSUBDIRS=    lib-old lib-tk site-packages test test/output test/data \
  709.         test/decimaltestdata \
  710.         encodings email email/test email/test/data compiler hotshot \
  711.         logging bsddb bsddb/test csv idlelib idlelib/Icons \
  712.         distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
  713.         curses $(MACHDEPS)
  714. libinstall:    $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR)
  715.     @for i in $(SCRIPTDIR) $(LIBDEST); \
  716.     do \
  717.         if test ! -d $(DESTDIR)$$i; then \
  718.             echo "Creating directory $$i"; \
  719.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  720.         else    true; \
  721.         fi; \
  722.     done
  723.     @for d in $(LIBSUBDIRS); \
  724.     do \
  725.         a=$(srcdir)/Lib/$$d; \
  726.         if test ! -d $$a; then continue; else true; fi; \
  727.         b=$(LIBDEST)/$$d; \
  728.         if test ! -d $(DESTDIR)$$b; then \
  729.             echo "Creating directory $$b"; \
  730.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
  731.         else    true; \
  732.         fi; \
  733.     done
  734.     @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \
  735.     do \
  736.         if test -x $$i; then \
  737.             $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
  738.             echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
  739.         else \
  740.             $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
  741.             echo $(INSTALL_DATA) $$i $(LIBDEST); \
  742.         fi; \
  743.     done
  744.     @for d in $(LIBSUBDIRS); \
  745.     do \
  746.         a=$(srcdir)/Lib/$$d; \
  747.         if test ! -d $$a; then continue; else true; fi; \
  748.         b=$(LIBDEST)/$$d; \
  749.         for i in $$a/*; \
  750.         do \
  751.             case $$i in \
  752.             *CVS) ;; \
  753.             *.py[co]) ;; \
  754.             *.orig) ;; \
  755.             *~) ;; \
  756.             *) \
  757.                 if test -d $$i; then continue; fi; \
  758.                 if test -x $$i; then \
  759.                     echo $(INSTALL_SCRIPT) $$i $$b; \
  760.                     $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
  761.                 else \
  762.                     echo $(INSTALL_DATA) $$i $$b; \
  763.                     $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
  764.                 fi;; \
  765.             esac; \
  766.         done; \
  767.     done
  768.     $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
  769.     PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
  770.         ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
  771.         -d $(LIBDEST) -f \
  772.         -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
  773.     PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  774.         ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
  775.         -d $(LIBDEST) -f \
  776.         -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
  777.     -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
  778.         ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
  779.         -d $(LIBDEST)/site-packages -f \
  780.         -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  781.     -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  782.         ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
  783.         -d $(LIBDEST)/site-packages -f \
  784.         -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  785.  
  786. # Create the PLATDIR source directory, if one wasn't distributed..
  787. $(srcdir)/Lib/$(PLATDIR):
  788.     mkdir $(srcdir)/Lib/$(PLATDIR)
  789.     cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
  790.     export PATH; PATH="`pwd`:$$PATH"; \
  791.     export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
  792.     export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
  793.     export EXE; EXE="$(BUILDEXE)"; \
  794.     cd $(srcdir)/Lib/$(PLATDIR); ./regen
  795.  
  796. # Install the include files
  797. INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
  798. inclinstall:
  799.     @for i in $(INCLDIRSTOMAKE); \
  800.     do \
  801.         if test ! -d $(DESTDIR)$$i; then \
  802.             echo "Creating directory $$i"; \
  803.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  804.         else    true; \
  805.         fi; \
  806.     done
  807.     @for i in $(srcdir)/Include/*.h; \
  808.     do \
  809.         echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
  810.         $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
  811.     done
  812.     $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
  813.  
  814. # Install the library and miscellaneous stuff needed for extending/embedding
  815. # This goes into $(exec_prefix)$(DEBUG_EXT)
  816. LIBPL=        $(LIBP)/config$(DEBUG_EXT)
  817. libainstall:    all
  818.     @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
  819.     do \
  820.         if test ! -d $(DESTDIR)$$i; then \
  821.             echo "Creating directory $$i"; \
  822.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  823.         else    true; \
  824.         fi; \
  825.     done
  826.     @if test -d $(LIBRARY); then :; else \
  827.         if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
  828.             if test "$(SO)" = .dll; then \
  829.                 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
  830.             else \
  831.                 $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
  832.                 $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
  833.             fi; \
  834.         else \
  835.             echo Skip install of $(LIBRARY) - use make frameworkinstall; \
  836.         fi; \
  837.     fi
  838.     $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
  839.     $(INSTALL_DATA) Modules/$(MAINOBJ) $(DESTDIR)$(LIBPL)/$(MAINOBJ)
  840.     $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
  841.     $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
  842.     $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
  843.     $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
  844.     $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
  845.     $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
  846.     $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
  847.     @if [ -s Modules/python.exp -a \
  848.         "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
  849.         echo; echo "Installing support files for building shared extension modules on AIX:"; \
  850.         $(INSTALL_DATA) Modules/python.exp        \
  851.                 $(DESTDIR)$(LIBPL)/python.exp;        \
  852.         echo; echo "$(LIBPL)/python.exp";        \
  853.         $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix    \
  854.                 $(DESTDIR)$(LIBPL)/makexp_aix;        \
  855.         echo "$(LIBPL)/makexp_aix";            \
  856.         $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix    \
  857.                 $(DESTDIR)$(LIBPL)/ld_so_aix;        \
  858.         echo "$(LIBPL)/ld_so_aix";            \
  859.         echo; echo "See Misc/AIX-NOTES for details.";    \
  860.     else true; \
  861.     fi
  862.     @case "$(MACHDEP)" in beos*) \
  863.         echo; echo "Installing support files for building shared extension modules on BeOS:"; \
  864.         $(INSTALL_DATA) Misc/BeOS-NOTES $(DESTDIR)$(LIBPL)/README;    \
  865.         echo; echo "$(LIBPL)/README";            \
  866.         $(INSTALL_SCRIPT) Modules/ar_beos $(DESTDIR)$(LIBPL)/ar_beos; \
  867.         echo "$(LIBPL)/ar_beos";            \
  868.         $(INSTALL_SCRIPT) Modules/ld_so_beos $(DESTDIR)$(LIBPL)/ld_so_beos; \
  869.         echo "$(LIBPL)/ld_so_beos";            \
  870.         echo; echo "See Misc/BeOS-NOTES for details.";    \
  871.         ;; \
  872.     esac
  873.  
  874. # Install the dynamically loadable modules
  875. # This goes into $(exec_prefix)
  876. sharedinstall:
  877.     $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
  878.            --prefix=$(prefix) \
  879.         --install-scripts=$(BINDIR) \
  880.         --install-platlib=$(DESTSHARED) \
  881.         --root=/$(DESTDIR)
  882.  
  883. # Here are a couple of targets for MacOSX again, to install a full
  884. # framework-based Python. frameworkinstall installs everything, the
  885. # subtargets install specific parts. Much of the actual work is offloaded to
  886. # the Makefile in Mac/OSX
  887. #
  888. frameworkinstall: frameworkinstallframework \
  889.     frameworkinstallapps frameworkinstallunixtools
  890.  
  891. # On install, we re-make the framework
  892. # structure in the install location, /Library/Frameworks/ or the argument to
  893. # --enable-framework. If --enable-framework has been specified then we have
  894. # automatically set prefix to the location deep down in the framework, so we
  895. # only have to cater for the structural bits of the framework.
  896.  
  897. frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
  898.  
  899. frameworkinstallstructure:    $(LDLIBRARY)
  900.     @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
  901.         echo Not configured with --enable-framework; \
  902.         exit 1; \
  903.     else true; \
  904.     fi
  905.     @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
  906.         if test ! -d $(DESTDIR)$$i; then \
  907.             echo "Creating directory $(DESTDIR)$$i"; \
  908.             $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
  909.         else    true; \
  910.         fi; \
  911.     done
  912.     $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
  913.     $(INSTALL_DATA) $(RESSRCDIR)/Info.plist $(DESTDIR)$(prefix)/Resources/Info.plist
  914.     $(INSTALL_DATA) $(RESSRCDIR)/version.plist $(DESTDIR)$(prefix)/Resources/version.plist
  915.     $(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
  916.         $(DESTDIR)$(prefix)/Resources/English.lproj/InfoPlist.strings
  917.     $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
  918.     $(LN) -fsn Versions/Current/Python $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Python
  919.     $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
  920.     $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
  921.     $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
  922.  
  923. # This installs Mac/Lib into the framework
  924. frameworkinstallmaclib:
  925.     ln -sf ../../../Python $(DESTDIR)$(prefix)/lib/python$(VERSION)/config/libpython$(VERSION).a
  926.     cd Mac/OSX && $(MAKE) installmacsubtree \
  927.         $(RUNSHARED) DESTDIR=$(DESTDIR)
  928.  
  929. # This installs the IDE, the Launcher and other apps into /Applications
  930. frameworkinstallapps:
  931.     cd Mac/OSX && $(MAKE) installapps DESTDIR=$(DESTDIR)
  932.  
  933. # This install the unix python and pythonw tools in /usr/local/bin
  934. frameworkinstallunixtools:
  935.     cd Mac/OSX && $(MAKE) installunixtools DESTDIR=$(DESTDIR) 
  936.  
  937. frameworkaltinstallunixtools:
  938.     cd Mac/OSX && $(MAKE) altinstallunixtools DESTDIR=$(DESTDIR) 
  939.  
  940. # This installs the Demos and Tools into the applications directory.
  941. # It is not part of a normal frameworkinstall
  942. frameworkinstallextras:
  943.     cd Mac/OSX && $(MAKE) installextras DESTDIR=$(DESTDIR)
  944.  
  945. # This installs a few of the useful scripts in Tools/scripts
  946. scriptsinstall:
  947.     SRCDIR=$(srcdir) $(RUNSHARED) \
  948.     ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
  949.     --prefix=$(prefix) \
  950.     --install-scripts=$(BINDIR) \
  951.     --root=/$(DESTDIR)
  952.  
  953. # Build the toplevel Makefile
  954. Makefile.pre: Makefile.pre.in config.status
  955.     CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
  956.     $(MAKE) -f Makefile.pre Makefile
  957.  
  958. # Run the configure script.
  959. config.status:    $(srcdir)/configure
  960.     $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
  961.  
  962. .PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
  963.  
  964. # Some make's put the object file in the current directory
  965. .c.o:
  966.     $(CC) -c $(PY_CFLAGS) -o $@ $<
  967.  
  968. # Rerun configure with the same options as it was run last time,
  969. # provided the config.status script exists
  970. recheck:
  971.     $(SHELL) config.status --recheck
  972.     $(SHELL) config.status
  973.  
  974. # Rebuild the configure script from configure.in; also rebuild pyconfig.h.in
  975. autoconf:
  976.     (cd $(srcdir); autoconf)
  977.     (cd $(srcdir); autoheader)
  978.  
  979. # Create a tags file for vi
  980. tags::
  981.     cd $(srcdir); \
  982.     ctags -w -t Include/*.h; \
  983.     for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \
  984.     done; \
  985.     sort -o tags tags
  986.  
  987. # Create a tags file for GNU Emacs
  988. TAGS::
  989.     cd $(srcdir); \
  990.     etags Include/*.h; \
  991.     for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
  992.  
  993. # Sanitation targets -- clean leaves libraries, executables and tags
  994. # files, which clobber removes those as well
  995.  
  996. clean:
  997.     find . -name '*.o' -exec rm -f {} ';'
  998.     find . -name '*.s[ol]' -exec rm -f {} ';'
  999.     find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
  1000.  
  1001. clobber: clean
  1002.     -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
  1003.         tags TAGS \
  1004.         config.cache config.log pyconfig.h Modules/config.c
  1005.     -rm -rf build platform
  1006.     -rm -rf $(PYTHONFRAMEWORKDIR)
  1007.  
  1008. # Make things extra clean, before making a distribution:
  1009. # remove all generated files, even Makefile[.pre]
  1010. distclean: clobber
  1011.     -rm -f core Makefile Makefile.pre buildno config.status \
  1012.         Modules/Setup Modules/Setup.local Modules/Setup.config
  1013.     find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
  1014.                -o -name '[@,#]*' -o -name '*.old' \
  1015.                -o -name '*.orig' -o -name '*.rej' \
  1016.                -o -name '*.bak' ')' \
  1017.                -exec rm -f {} ';'
  1018.  
  1019. # Check for smelly exported symbols (not starting with Py/_Py)
  1020. smelly: all
  1021.     nm -p $(LIBRARY) | \
  1022.         sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
  1023.  
  1024. # Find files with funny names
  1025. funny:
  1026.     find $(DISTDIRS) -type d \
  1027.         -o -name '*.[chs]' \
  1028.         -o -name '*.py' \
  1029.         -o -name '*.doc' \
  1030.         -o -name '*.sty' \
  1031.         -o -name '*.bib' \
  1032.         -o -name '*.dat' \
  1033.         -o -name '*.el' \
  1034.         -o -name '*.fd' \
  1035.         -o -name '*.in' \
  1036.         -o -name '*.tex' \
  1037.         -o -name '*,[vpt]' \
  1038.         -o -name 'Setup' \
  1039.         -o -name 'Setup.*' \
  1040.         -o -name README \
  1041.         -o -name Makefile \
  1042.         -o -name ChangeLog \
  1043.         -o -name Repository \
  1044.         -o -name Root \
  1045.         -o -name Entries \
  1046.         -o -name Tag \
  1047.         -o -name tags \
  1048.         -o -name TAGS \
  1049.         -o -name .cvsignore \
  1050.         -o -name MANIFEST \
  1051.         -o -print
  1052.  
  1053. # Dependencies
  1054.  
  1055. Python/thread.o:  $(srcdir)/Python/thread_atheos.h $(srcdir)/Python/thread_beos.h $(srcdir)/Python/thread_cthread.h $(srcdir)/Python/thread_foobar.h $(srcdir)/Python/thread_lwp.h $(srcdir)/Python/thread_nt.h $(srcdir)/Python/thread_os2.h $(srcdir)/Python/thread_pth.h $(srcdir)/Python/thread_pthread.h $(srcdir)/Python/thread_sgi.h $(srcdir)/Python/thread_solaris.h $(srcdir)/Python/thread_wince.h
  1056.  
  1057. # Declare targets that aren't real files
  1058. .PHONY: all sharedmods oldsharedmods test quicktest memtest
  1059. .PHONY: install altinstall oldsharedinstall bininstall altbininstall
  1060. .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
  1061. .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
  1062. .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
  1063. .PHONY: recheck autoconf clean clobber distclean smelly funny
  1064.  
  1065. # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
  1066.  
  1067. # Rules appended by makedepend
  1068.  
  1069. Modules/threadmodule.o: $(srcdir)/Modules/threadmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/threadmodule.c -o Modules/threadmodule.o
  1070. Modules/threadmodule$(SO):  Modules/threadmodule.o; $(LDSHARED)  Modules/threadmodule.o   -o Modules/threadmodule$(SO)
  1071. Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o
  1072. Modules/signalmodule$(SO):  Modules/signalmodule.o; $(LDSHARED)  Modules/signalmodule.o   -o Modules/signalmodule$(SO)
  1073. Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/posixmodule.c -o Modules/posixmodule.o
  1074. Modules/posixmodule$(SO):  Modules/posixmodule.o; $(LDSHARED)  Modules/posixmodule.o   -o Modules/posixmodule$(SO)
  1075. Modules/errnomodule.o: $(srcdir)/Modules/errnomodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/errnomodule.c -o Modules/errnomodule.o
  1076. Modules/errnomodule$(SO):  Modules/errnomodule.o; $(LDSHARED)  Modules/errnomodule.o   -o Modules/errnomodule$(SO)
  1077. Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/pwdmodule.c -o Modules/pwdmodule.o
  1078. Modules/pwdmodule$(SO):  Modules/pwdmodule.o; $(LDSHARED)  Modules/pwdmodule.o   -o Modules/pwdmodule$(SO)
  1079. Modules/_sre.o: $(srcdir)/Modules/_sre.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/_sre.c -o Modules/_sre.o
  1080. Modules/_sre$(SO):  Modules/_sre.o; $(LDSHARED)  Modules/_sre.o   -o Modules/_sre$(SO)
  1081. Modules/_codecsmodule.o: $(srcdir)/Modules/_codecsmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/_codecsmodule.c -o Modules/_codecsmodule.o
  1082. Modules/_codecsmodule$(SO):  Modules/_codecsmodule.o; $(LDSHARED)  Modules/_codecsmodule.o   -o Modules/_codecsmodule$(SO)
  1083. Modules/zipimport.o: $(srcdir)/Modules/zipimport.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/zipimport.c -o Modules/zipimport.o
  1084. Modules/zipimport$(SO):  Modules/zipimport.o; $(LDSHARED)  Modules/zipimport.o   -o Modules/zipimport$(SO)
  1085. Modules/symtablemodule.o: $(srcdir)/Modules/symtablemodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/symtablemodule.c -o Modules/symtablemodule.o
  1086. Modules/_symtablemodule$(SO):  Modules/symtablemodule.o; $(LDSHARED)  Modules/symtablemodule.o   -o Modules/_symtablemodule$(SO)
  1087. Modules/xxsubtype.o: $(srcdir)/Modules/xxsubtype.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/xxsubtype.c -o Modules/xxsubtype.o
  1088. Modules/xxsubtype$(SO):  Modules/xxsubtype.o; $(LDSHARED)  Modules/xxsubtype.o   -o Modules/xxsubtype$(SO)
  1089.